import java.util.Scanner;

/**
 * @author lijunhao
 * 2023/7/11 作业
 * @description TODO
 */
public class Guess {public static void main(String[] args) {
    int  randomNum=(int)(Math.random()*100+1);
   Scanner sc = new Scanner (System.in);int count=0;
    //System.out.println(randomNum);
    for(int a=0;a<7;a++) {
        System.out.println("请输入您猜的数字：");

        int guessNum = sc.nextInt();
        if (guessNum < randomNum) {
            count ++;
            System.out.println("太小了，再大一点！");
        }
        if (guessNum > randomNum) {
            count ++;
            System.out.println("太大了，再小一点！");
        }
        if (guessNum == randomNum) {
            System.out.println("恭喜你猜对了！");

        }
        if (count==7) {
            System.out.println("你太笨了，下次再来吧");
        }
}}}
